//
//  RecordCallingTimeViewCtrl.m
//  yixintong
//
//  Created by longzhiyuan on 15/6/5.
//
//

#import "RecordCallingTimeViewCtrl.h"

@interface RecordCallingTimeViewCtrl ()
@property (retain, nonatomic) IBOutlet UILabel *labStartTime;
@property (retain, nonatomic) IBOutlet UILabel *labEndTime;
@property (retain, nonatomic) IBOutlet UILabel *labSum;

@end

@implementation RecordCallingTimeViewCtrl

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
}
-(void)viewDidAppear:(BOOL)animated
{
    NSString *nsStrStarTime=(NSString *)[[NSUserDefaults standardUserDefaults]objectForKey:@"starTime"];
    NSString *nsStrEndTime=(NSString *)[[NSUserDefaults standardUserDefaults]objectForKey:@"endTime"];
    self.labStartTime.text=[NSString stringWithFormat:@"开始时间:%@ (秒)",nsStrStarTime];
    self.labEndTime.text=[NSString stringWithFormat:@"结束时间:%@ (秒)",nsStrEndTime];;
    self.labSum.text = [NSString stringWithFormat:@"用了:%d (秒)",([nsStrEndTime integerValue]-[nsStrStarTime integerValue])];
    [super viewDidAppear:animated];
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

- (void)dealloc {
    [_labStartTime release];
    [_labEndTime release];
    [_labSum release];
    [super dealloc];
}
- (void)viewDidUnload {
    [self setLabStartTime:nil];
    [self setLabEndTime:nil];
    [self setLabSum:nil];
    [super viewDidUnload];
}
@end
